package cn.springcloud.fix.consumer.service;

import cn.springcloud.fix.common.cache.entity.RedisMessageEnum;
import cn.springcloud.fix.common.cache.service.RedisConsumer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.Message;
import org.springframework.stereotype.Service;

import java.util.Objects;

@Slf4j
@Service
public class RedisMessageConsumer2 implements RedisConsumer {

    @Override
    public Boolean support(String messageType) {
        return Objects.equals(RedisMessageEnum.REDIS_MESSAGE_B.getName(), messageType);
    }

    @Override
    public void handle(Message message, byte[] bytes) {
        System.out.println("我是消费者2");
    }
}
